package com.wyr.dynamic_proxy.aspect;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class MyAspect {

    @Pointcut(value = "execution(* com.wyr.dynamic_proxy.service.*.test(..))")
    public void pointDemo(){

    }

    //前置通知
    @Before(value = "pointDemo()")
    public void before(){
        System.out.println("before........");
    }

    //前置通知
    @AfterReturning(value = "pointDemo()")
    public void afterReturning(){
        System.out.println("afterReturning........");
    }
}
